// vite.config.js
import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'
import {resolve} from "path";

export default defineConfig((config) => {
    var mode = config.mode
    var envConfig = loadEnv(mode, './');
    var config = {
        resolve: {
            alias: [
                {find: '@', replacement: resolve(__dirname, 'src')},
            ]
        },
        plugins: [vue()],
        server: {
            proxy: {
                '^/adminweb': {
                    target: 'http://ydts3.hbwlife.com/',
                    changeOrigin: true,
                    configure: (proxy, options) => {
                    }
                }
            }
        }
    }

    return config
})
